All Questions
35 questions
4votes
1answer
527views
Single-player obstacle-avoidance space game
I was wondering what I could do to improve the gameplay of this game, as well as the graphics. I would like to use LWJGL, but the rendering library isn't important. I just need to find out ...
1vote
2answers
142views
RPG Map Initialization
I am working on an RPG in Java and I am using a tile-based map. The characters will not be building, so I will not need to store the maps outside of the game, but I feel as if there is a more ...
4votes
1answer
3kviews
A simple Java game where the player guesses the word
It's a simple word guessing game. The game picks a random word - you guess a letter until it's correct, the game automatically starts a new one. Is my code readable? Am I doing anything that could be ...
5votes
3answers
1kviews
Java version of card game "higher or lower"
First of all, I have my basic main method which does pretty much nothing: ...
1vote
1answer
64views
Path Following Algorithm for Entity
Within my game there are many entities, where each entity has a path (Array<Vector2>) assigned to it. No path to follow (indicating that the entity should ...
6votes
2answers
968views
Collision Detection in a 2D shooter game
I have the following code that works just fine for collision detection. The only problem is its size and its performance. I'm trying to do it and many other things 60 times per second, which doesn't ...
5votes
1answer
107views
Draw the tiles of the islands that are within bounds, using LibGDX
I am new person regarding LibGDX. I have written the below render method. I have a randomly generations oceans (where there are islands at random positions). Within the below code, ...
4votes
2answers
171views
Optimized updates of a grid-based particle system
I've been working on a game somewhat similar to this one for a little while now. My game is based around a 'board,' which is filled with different types of particles that react with one another and ...
7votes
3answers
1kviews
Moving game objects along an A* Path
I am having a game with a lot of GameBodyObjects and some of them are moving, some of them are not. When I calculate A* for the moving objects it gets really slow ...
5votes
1answer
352views
Collision detection method
I think everyone has some code they are embarrassed and not proud of and today I have decided to show mine. I'm not sure how to go about making this more efficient. At the time I was just happy it did ...
2votes
0answers
88views
Don't Update Every AI Every Tick
In my game there are AI characters that try to either steal your gold or destroy the walls of your castle. Previously I simply updated them all every second, but with a large number of characters on ...
4votes
1answer
3kviews
Tetris random piece generator
I was inspired by this Reddit /r/dailyprogrammer challenge: Contrary to popular belief, the tetromino pieces you are given in a game of Tetris are not randomly selected. Instead, all seven pieces ...
5votes
2answers
3kviews
Unexpected Low FPS while drawing images
I am in the process of making a game, and during this endeavour, I have come across problems maintaining a good frames per second while drawing my sprites. When I draw my background image, my frames ...
5votes
2answers
293views
Movement around a large map
I'm trying to make a small shooter game, where you can only see a small portion of the map around you. The map will also be much larger then the actual JPanel (The panel is 1000 by 1000, the map ...
2votes
2answers
178views
My spaceship is slow to explode after being hit by the asteroid
I am making a game for my computer science class. My professor's requirements are: Write a Processing program that draws a triangle in the middle of the window. Rotate the triangle when the left and ...